package pers.jing.android.helper

import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.*
import org.jetbrains.compose.ui.tooling.preview.Preview
import org.koin.compose.KoinApplication

import pers.jing.android.helper.page.MainPage
import pers.jing.android.helper.model.UICloseSate

@Composable
@Preview
fun App(closeSate: UICloseSate, onConfirmClose: () -> Unit, onCancelClose: () -> Unit,
        paramConfig: ParamConfig, onClearParam: () -> Unit) {
    KoinApplication(application = {
        modules(appModule)
    }) {
        MaterialTheme(
            colorScheme = AppLightColorScheme
        ) {
            MainPage(closeSate,
                onConfirmClose = onConfirmClose,
                onCancelClose = onCancelClose,
                paramConfig = paramConfig,
                onClearParam = onClearParam
            )
        }
    }

}